class User {
    constructor(data) {
        this.createUserFromData(data);
    }

    createUserFromData(data) {
        this.id = data.id;
        this.username = data.username;
        this.password = data.password;
        this.isLogin = data.isLogin;
        this.groupId = data.groupId;
        this.role = data.role;
        this.createTime = new Date().getTime();
        this.updateTime = new Date().getTime();
    }
}
